package com.dusk.service;

import com.dusk.pojo.House;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;



public interface HouseService {
    //查询一条房屋信息
    House queryHouseById(int houseId);

    //查询所有房屋信息
    List<House> queryAllHouse();

    //查询所有租房房屋信息
    List<House> queryAllHouseRent();

    //更新评分
    void updateScore(@Param("id") int houseId, @Param("score") double score);

    //增加房屋信息
    int insertHouse(House house);

    //查询所有出售房屋信息
    List<House> queryAllHouseBuy();

    //条件查询
    List<House> queryHouseByCondition(@Param("price") String price, @Param("date1")Date
            date1, @Param("date2")Date date2,@Param("type")String type,
                                      @Param("score1") Double score1,@Param("score2")
                                              Double score2,@Param("status") int status );

    //通过uuid，status查询所有数据
    List<House> queryHouseByUuidAndStatus(@Param("uuid") String uuid, @Param("status") Integer status);

    //根据id删除房屋信息
    int deleteHouseById(@Param("id") int id);

    //查询房屋总数量
    int queryAllHouseCount();

    //更新房屋数据
    int updateHouse(House house);

}
